package com.onyx.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 目标记录
 * @TableName order_target
 */
public class OrderTarget implements Serializable {
    /**
     * 
     */
    private Long id;

    /**
     * 目标开始时间
     */
    private Date startTime;

    /**
     * 目标结束时间
     */
    private Date endTime;

    /**
     * 目标
     */
    private String target;

    /**
     * 已经完成
     */
    private String hasDone;

    /**
     * 目标状态 0 未完成   1已经完成
     */
    private Integer targetState;

    /**
     * 关联到的用户, 公司整体的为0
     */
    private Long userId;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Long getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 目标开始时间
     */
    public Date getStartTime() {
        return startTime;
    }

    /**
     * 目标开始时间
     */
    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    /**
     * 目标结束时间
     */
    public Date getEndTime() {
        return endTime;
    }

    /**
     * 目标结束时间
     */
    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    /**
     * 目标
     */
    public String getTarget() {
        return target;
    }

    /**
     * 目标
     */
    public void setTarget(String target) {
        this.target = target;
    }

    /**
     * 已经完成
     */
    public String getHasDone() {
        return hasDone;
    }

    /**
     * 已经完成
     */
    public void setHasDone(String hasDone) {
        this.hasDone = hasDone;
    }

    /**
     * 目标状态 0 未完成   1已经完成
     */
    public Integer getTargetState() {
        return targetState;
    }

    /**
     * 目标状态 0 未完成   1已经完成
     */
    public void setTargetState(Integer targetState) {
        this.targetState = targetState;
    }

    /**
     * 关联到的用户, 公司整体的为0
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * 关联到的用户, 公司整体的为0
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        OrderTarget other = (OrderTarget) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getTarget() == null ? other.getTarget() == null : this.getTarget().equals(other.getTarget()))
            && (this.getHasDone() == null ? other.getHasDone() == null : this.getHasDone().equals(other.getHasDone()))
            && (this.getTargetState() == null ? other.getTargetState() == null : this.getTargetState().equals(other.getTargetState()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getTarget() == null) ? 0 : getTarget().hashCode());
        result = prime * result + ((getHasDone() == null) ? 0 : getHasDone().hashCode());
        result = prime * result + ((getTargetState() == null) ? 0 : getTargetState().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", target=").append(target);
        sb.append(", hasDone=").append(hasDone);
        sb.append(", targetState=").append(targetState);
        sb.append(", userId=").append(userId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}